package com.yowasa.xiuxian.engine.hone.special;

import com.yowasa.xiuxian.annoations.SE;
import com.yowasa.xiuxian.engine.HoneEngine;
import com.yowasa.xiuxian.engine.hone.MentalInterface;
import com.yowasa.xiuxian.engine.hone.SpecialInterface;
import com.yowasa.xiuxian.entity.bo.user.UserBO;
import com.yowasa.xiuxian.entity.enums.ElementEnum;
import com.yowasa.xiuxian.exception.HandlerException;

@SE(name = "净水之息")
public class JingShuiZhiXi implements SpecialInterface {
    @Override
    public ElementEnum getElement() {
        return null;
    }

    @Override
    public void limit(UserBO user) {
        MentalInterface mental = HoneEngine.mentalMap.get(user.getUserConfig().getMental());
        if (mental == null) {
            throw new HandlerException("学习净水之息必须运转水属性心法");
        }
        if (mental.getElement() != ElementEnum.WATER) {
            throw new HandlerException("学习净水之息必须运转水属性心法");
        }

    }

    @Override
    public String limitDesc() {
        return "运转水属性心法";
    }

    @Override
    public String desc() {
        return "清心咒变为清除自身所有负面buff";
    }

}